﻿using ELearningSystem.Gateway.Entities;
using FluentNHibernate.Mapping;

namespace ELearningSystem.Gateway.Mappings
{
    public class ContentMap : ClassMap<Content>
    {
        public ContentMap()
        {
            Id(x => x.Id);
            Map(x => x.IsVideo);
            References(x => x.Video)
                .Not.LazyLoad()
                .Cascade.All();
            
            References(x => x.Practice)
                .Not.LazyLoad()
                .Cascade.All();
        }
    }
}
